package com_8;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class Test1 {
    public static void main(String[] args) {
        Collection<String>  c=new ArrayList<>();
        c.add("1");
        c.add("2");
        c.add("3");
        Iterator<String> iterator = c.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }


    }
}
